import { createMemoryHistory, createRouter } from 'vue-router'

import Login from "@/view/user-management/Login.vue";
import StationList from "@/components/StationList.vue";
import PileList from "@/components/PileList.vue";

import home from "@/view/marketing/home.vue";
import points from "@/view/marketing/points.vue";
import service from "@/view/marketing/service.vue";
import settings from "@/view/marketing/settings.vue";
import stations from "@/view/marketing/stations.vue";
import coupon from "@/view/marketing/coupon.vue";
import I from "@/view/marketing/I.vue";
import In from "@/view/marketing/In.vue";
import Inv from "@/view/marketing/Inv.vue";

import chargingpileDetail from "@/view/charging-management/chargingpileDetail.vue";
import OrderList   from "@/view/charging-management/OrderList.vue";
import recharge   from "@/view/charging-management/recharge.vue";

//2、配置路由表信息
const routes = [

    // {
    //     path: '/',   //根目录访问地址
    //     name: 'HomePage',
    //     component: HomePage
    // },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/',
        name: 'StationList',
        component: StationList
    },
    {
        path: '/piles/:stationId',
        name: 'PileList',
        component: PileList
    },
    {
        path: '/chargingpileDetail/:pileId/:stationId',
        name: 'chargingpileDetail',
        component: chargingpileDetail,
    },
    {
        path: '/OrderList',
        name: 'OrderList',
        component: OrderList,
    },
    {
        path: '/home',
        name: 'home',
        component: home
    },
    {
        path: '/points',
        name: 'points',
        component: points
    },
    {
        path: '/service',
        name: 'service',
        component: service
    },
    {
        path: '/stations',
        name: 'stations',
        component: stations
    },
    {
        path: '/settings',
        name: 'settings',
        component: settings
    },
    {
        path: '/recharge',
        name: 'recharge',
        component: recharge
    },
    {
        path: '/coupon',
        name: 'coupon',
        component: coupon
    },
    {
        path: '/I',
        name: 'I',
        component: I
    },
    {
        path: '/In',
        name: 'In',
        component: In
    },
    {
        path: '/In',
        name: 'In',
        component: Inv
    },


]
//创建路由器
const router = createRouter({
    history: createMemoryHistory(),
    routes,
})
export { router }